package com.huarui.returned.dao.impl;

import java.util.List;
import java.util.Map;
import org.ewaf.framework.dao.impl.BaseDaoImpl;
import org.ewaf.framework.model.IDataObject;

import com.huarui.returned.dao.IReturnedDao;
import com.huarui.returned.model.Returned;
import com.huarui.returned.model.ReturnedModel;

public class ReturnedDaoImpl extends BaseDaoImpl implements IReturnedDao{

	@SuppressWarnings("unchecked")
	@Override
	public List<Returned> getReturnedByConditions(Map map) {
		
		return getSqlMapClientTemplate().queryForList(namespace+".getReturnedByConditions", map);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<ReturnedModel> getReturnedByComplexConditons(Map map) {
		
		return getSqlMapClientTemplate().queryForList(namespace+".getReturnedByComplexConditons", map);
	}

	@SuppressWarnings("unchecked")
	@Override
	public Integer getReturnedCountByComplexConditons(Map queryMap) {
		
		return  (Integer) getSqlMapClientTemplate().queryForObject(namespace+".getReturnedCountByComplexConditons", queryMap);
	}

	@Override
	@SuppressWarnings("unchecked")
	public Returned getReturnedById(Map map) {
		return (Returned) getSqlMapClientTemplate().queryForObject(namespace+".getReturnedById", map);
		
	}

	
	
}
